extends Control



func _on_地狱杀伐_pressed():
	ObjectManager.soundManager.play(SoundType.button_click)
	if !GameUtils.checkIsReadyAction() || !GameUtils.checkActionEnough(SpendData.COST_灵阵_地狱杀伐):
		return
	ObjectManager.gameManager.operationManager.changeOperationType(OperationType.灵阵_地狱杀伐)
	visible = false
	ObjectManager.gameManager.ui.closeDesc()


func _on_明魂搜根_pressed():
	ObjectManager.soundManager.play(SoundType.button_click)
	if !GameUtils.checkIsReadyAction() || !GameUtils.checkActionEnough(SpendData.COST_天谕_明魂搜根):
		return
	ObjectManager.gameManager.operationManager.changeOperationType(OperationType.天谕_明魂搜根)
	visible = false
	ObjectManager.gameManager.ui.closeDesc()


func _on_天眼传真_pressed():
	ObjectManager.soundManager.play(SoundType.button_click)
	if !GameUtils.checkIsReadyAction() || !GameUtils.checkActionEnough(SpendData.COST_天谕_天眼传真):
		return
	ObjectManager.gameManager.operationManager.changeOperationType(OperationType.天谕_天眼传真)
	visible = false
	ObjectManager.gameManager.ui.closeDesc()


func _on_神兵天降_pressed():
	ObjectManager.soundManager.play(SoundType.button_click)
	if !GameUtils.checkIsReadyAction() || !GameUtils.checkActionEnough(SpendData.COST_天谕_神兵天降):
		return
	ObjectManager.gameManager.operationManager.changeOperationType(OperationType.天谕_神兵天降)
	visible = false
	ObjectManager.gameManager.ui.closeDesc()


func _on_明魂搜根_mouse_entered():
	var ui = ObjectManager.gameManager.ui as UI
	ui.wantShowDesc("明魂搜根：消耗2点能量，指定敌方大子，本回合内敌方发展脉络可见")


func _on_天眼传真_mouse_entered():
	var ui = ObjectManager.gameManager.ui as UI
	ui.wantShowDesc("天眼传真：消耗6点能量，本回合内，拥有全局视野，无视迷雾森林")


func _on_神兵天降_mouse_entered():
	var ui = ObjectManager.gameManager.ui as UI
	ui.wantShowDesc("神兵天降：消耗5点能量，指定一个空地，从小子远程出大")

func _on_mouse_exited():
	var ui = ObjectManager.gameManager.ui as UI
	ui.closeDesc()
